package cn.iocoder.an.module.business.dal.mysql.equipmentcheckplan;

import java.util.*;

import cn.iocoder.an.framework.common.pojo.PageResult;
import cn.iocoder.an.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.an.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.an.module.business.dal.dataobject.equipmentcheckplan.EquipmentCheckPlanDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.an.module.business.controller.admin.equipmentcheckplan.vo.*;
import org.springframework.stereotype.Repository;

/**
 * 点检计划 Mapper
 *
 * @author zzy
 */
@Mapper
public interface EquipmentCheckPlanMapper extends BaseMapperX<EquipmentCheckPlanDO> {

    default PageResult<EquipmentCheckPlanDO> selectPage(EquipmentCheckPlanPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<EquipmentCheckPlanDO>()
                .likeIfPresent(EquipmentCheckPlanDO::getName, reqVO.getName())
                .likeIfPresent(EquipmentCheckPlanDO::getEquipmentTypeName, reqVO.getEquipmentTypeName())
                .orderByDesc(EquipmentCheckPlanDO::getId));
    }

}